import request from '../https/request';
//登录验证
export const loginOn= (data)=>{
    console.log("========getLogin==========")
   return request({
        url:'/login',//http://localhost:9090/owep/login
        method:'post',
        data:data
    })
}
//登录验证
export const getAllList= ()=>{
    console.log("========getList==========")
   return request({
        url:'/user/list',//http://localhost:9090/owep/login
        method:'get',
        // data:data
    })


}
export const getList= ()=>{
    console.log("========getList==========")
    return  request({
        url:'/book',
        method:'get',
        // data:data
    })

}

export const deleteOne= (id)=>{
    console.log("========deleteOne==========")
    return  request({
        url:`/book/${id}`,
        method:'delete',
        // data:data
    })
    
}
export const updateBook= (data)=>{
    console.log("========updateBook==========")
    return  request({
        url:`/book`,
        method:'put',
        data:data
    })
    
}

export const addBook= (data)=>{
    console.log("========addUpdate==========")
    return  request({
        url:`/book`,
        method:'post',
        data:data
    })
    
}
export const deleteAll= (data)=>{
    console.log("========deleteAll==========",data)
    return  request({
        url:`/book`,
        method:'delete',
        data:data
    })
    
}